package com.sy.controller;


import com.sy.entity.Commit;
import com.sy.vo.CommitAdd;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class CommitController extends BaseController {

    @RequestMapping(value = "commit", method = RequestMethod.POST)
    public void getCommitByCommitAdd(@RequestBody CommitAdd commitAdd){
        commitService.addCommitByCommitAdd(commitAdd);
        System.out.println(commitAdd);
    }

    @RequestMapping(value = "commit", method = RequestMethod.GET)
    public List<Commit> getCommitList(Integer id, Integer type) {
        return commitService.getCommitList(id, type);
    }
}
